Comparison of WebSocket implementations

Contents

Comparison of WebSocket Implementations

Rationale

The WebSocket protocol is implemented in different browsers, run-time environments and libraries acting as clients or servers. The intention of this comparison is to show different features of WebSocket implementations to help developers and users making informed decisions regarding deployment and use.

Table of WebSocket implementations

Autobahn
for Python
Google
Chrome 15
cwebsocket Mozilla
Firefox 7
Mozilla
Firefox 8
Jetty UnittWebSocket libwebsockets apache-websocket pywebsocket WebSocket-Node ws4py The Server Framework WebSocket++ Wt (web toolkit) XSockets.NET
Project Homepage Homepage Homepage Homepage Homepage Homepage Homepage Homepage Homepage Homepage Homepage Homepage Homepage Homepage Homepage Homepage Homepage
Client (library) Yes Yes No Yes Yes Yes Yes Yes No No Yes Yes
(Threaded and Tornado)
Yes Yes No Yes
Server (library) Yes No Yes No No Yes No Yes Yes (For Apache HTTPD web server) Yes Yes Yes
(CherryPy)
Yes Yes Yes Yes
Version compared 0.4.10
13 Dec 2011
15.0.874.8
12 Sep 2011
r32
29 Aug 2010
7 beta
12 Sep 2011
8.0a/9.0a
12 Sep 2011
7.5.1
9 Sep 2011
0.9.4/0.9.2
29 Sep 2011
?
24 Aug 2011
?
29 Oct 2011
0.6b5
30 Aug 2011
v0.0.13
18 Aug 2011
0.1.1
21 Aug 2011
v6.5
5 Sep 2011
2010-10-10
10 Oct 2011
3.2.0
30 Nov 2011
0.9.4.2
17 Dec 2011
Protocol (Spec) version support 8, 13 (draft 10-17 and RFC 6455) 8 (10) Hixie 76 (0) 8 (10) 8 (10) 0-13 (0-13)[1] Hixie 75/76, HyBi 7,8,10 8 (10) draft 75/76 (Hixie), 7,8,13 (HyBi) [1] 8 (12) 8 (10) 8 (10) Hixie 76, HyBi 7,8,13, RFC 6455 7,8,13 (17) 0,7,8,13 (17) 0,7,8 (10)
Protocol Test Report Report (Client)
Report (Server)
Report [? Report] Report Report JUnit
Autobahn
[? Report] [? Report] [? Report] [? Report] Report Report Report Report (Client)
Report (Server)
[? Report] [? Report]
License Apache 2 complex MIT MPL & GPL & LGPL MPL & GPL & LGPL Apache 2 & EPL Apache 2 LGPL (v2) Apache 2 BSD Apache 2 BSD Commercial BSD GPL & Commercial [FreeWare]
Implementation language/environment Python / Twisted C++ / WebKit C / Sockets C++ / Necko C++ / Necko Java / J2SE & Android Java / J2SE & Android & Objective-C & IOS C / Sockets C / Sockets Python JavaScript / Node.js Python C++ Windows IOCP C++ / Boost Asio C++ / Boost Asio C# / .NET 4.0
API language/environment Python / Twisted JavaScript / HTML5 C JavaScript / HTML5 JavaScript / HTML5 Java / javax.servlet Java / J2SE & Android & Objective-C & IOS C / own event loop[2] C / Sockets Python JavaScript / Node.js Python C++ Windows C++ C++ [[C#]/Windows] [[JavaScript]/HTML5]
Text Message support Yes Yes ? Yes Yes Yes Yes Yes ? ? Yes Yes Yes Yes Yes Yes
Binary Message support Yes No ? No No Yes Yes Yes ? ? Yes Yes Yes Yes Yes No (Next version includes binary support)
Message-based API Yes Yes ? Yes Yes Yes Yes No [3] ? ? Yes Yes Yes Yes No Yes
Frame-based API Yes No ? No No Yes Yes No [4] ? ? Yes Yes Yes No No No
Streaming API Input/Output Yes/Yes [2] No/No ?/? No/No No/No No/No[5] No/No[5] Yes/Yes ?/? ?/? No/No No/No Yes/Yes No/No No No
Flow-control framework Yes [3] No ? No No Yes[6] Yes[6] Yes ? ? No No Yes[6] Yes[6] Yes Yes
Automatic Pongs for Pings Yes Yes ? Yes Yes Yes Yes Yes ? ? Yes Yes Yes Yes Yes No
Automatic Heartbeat Pings No No ? No No No No No ? ? Optional No No No Yes No
Manual Pings/Pongs Yes No ? No No Yes Yes Yes ? ? Yes Yes Yes Yes No No
Frame Size Limit 2^63 (streaming API)
memory-limited/configurable (other APIs)
>=16MB
(memory-limited?)
 ? <16MB <16MB 2^32 tx
2^63 rx
2^32 tx (configurable)
2^63 rx (configurable)
2^63  ?  ? memory-limited, configurable memory-limited 2^63 or configurable limit memory-limited, configurable memory-limited, configurable  ?

Notes

  1. ^ Server accepts 0-13, Client sends only 13.
  2. ^ There is a low-level support for integration with external event loops.
  3. ^ Users can build a message-based layer on top of the streaming API provided.
  4. ^ Users can build a frame-based layer on top of the streaming API provided.
  5. ^ a b Frames larger that the buffer are fragmented and passed to the message layer as a stream of smaller frames.
  6. ^ a b c d Internal queuing is avoided so that natural TCP/IP backpressure is used for flow control. A slow application consuming messages will eventually block a busy sender.